import { ColumnProps } from "/@/components/ProTable/interface";
import { leaveType, leaveStatus } from "/@/utils/serviceDict";

// 配置项
const columns = (): Partial<ColumnProps>[] => {
    return [{
            type: "selection",
            width: 60,
            fixed: "left"
        },
        {
            type: "index",
            label: "#",
            width: 60
        },
        {
            prop: "leaveType",
            label: "请假类型",
            tag: true,
            enum: leaveType,
            search: true,
            searchType: "select",
            width: 120
        },
        {
            prop: "leaveBeginDate",
            label: "开始时间",
            width: 180,
            search: true,
        },
        {
            prop: "leaveEndDate",
            label: "结束时间",
            width: 180,
            search: true,
        },
        {
            prop: "dataStatus",
            label: "当前流程",
            width: 120,
            tag: true,
            enum: leaveStatus,
            search: true,
            searchType: "select"
        },
        {
            prop: "dataStatus",
            label: "请假状态",
            width: 180,
            
        },
        {
            prop: "leaveReason",
            label: "请假事由",
        },
        {
            prop: "operation",
            label: "操作",
            width: 200,
            fixed: "right"
        }
    ]
}

export default columns;